<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>过渡transition</title>
    <style>
        .box {
            width: 200px;
            height: 100px;
            background: skyblue;
            /* 如果写多个属性过渡可以加逗号进行分割或者写all */
            /* transition: width 1s, height 1s; */
            transition: all 1s linear 0.5s;
            /* 增加宽度使用过渡动画 */
            /* transition: width 1s; */
        }
        
        .box .son {
            width: calc(100% - 20px);
            height: 50px;
            background: pink;
        }
        /* 如果过渡效果给hover加上，则鼠标离开的时候会瞬间还原，无过渡效果 */
        
        .box:hover {
            width: 300px;
            height: 200px;
            /* transition: all 1s linear 0.5s; */
        }
    </style>
</head>

<body>
    <h3>谁做过渡给谁加效果，transition:要过渡的属性 花费时间 [运动曲线] [何时开始]</h3>
    <div class="box">
        <div class="son"></div>
    </div>
</body>

</html>